This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started work on border transfer. Hotfix for counties.
- Loading branch information
Showing
44 changed files
with
34,516 additions
and
94 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Sledgehammer [Bungeecord]/src/main/java/com/noahhusby/sledgehammer/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.noahhusby.sledgehammer; | ||
|
||
public class Constants { | ||
public static final String PLUGINID = "sledgehammer"; | ||
public static final String VERSION = "0.2.2"; | ||
public static final double SCALE = 7318261.522857145; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...r [Bungeecord]/src/main/java/com/noahhusby/sledgehammer/commands/SledgehammerCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.noahhusby.sledgehammer.commands; | ||
|
||
import com.noahhusby.sledgehammer.util.ChatHelper; | ||
import net.md_5.bungee.api.CommandSender; | ||
import net.md_5.bungee.api.plugin.Command; | ||
|
||
public class SledgehammerCommand extends Command { | ||
public SledgehammerCommand() { | ||
super("sledgehammer"); | ||
} | ||
|
||
@Override | ||
public void execute(CommandSender commandSender, String[] strings) { | ||
ChatHelper.getInstance().infoMessage(commandSender); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...[Bungeecord]/src/main/java/com/noahhusby/sledgehammer/handlers/PlayerLocationHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.noahhusby.sledgehammer.handlers; | ||
|
||
import com.google.common.collect.Maps; | ||
import com.noahhusby.sledgehammer.Constants; | ||
import com.noahhusby.sledgehammer.Sledgehammer; | ||
import com.noahhusby.sledgehammer.projection.GeographicProjection; | ||
import com.noahhusby.sledgehammer.projection.ModifiedAirocean; | ||
import com.noahhusby.sledgehammer.projection.ScaleProjection; | ||
import com.noahhusby.sledgehammer.util.Point; | ||
import com.noahhusby.sledgehammer.util.ProxyUtil; | ||
import net.md_5.bungee.api.connection.ProxiedPlayer; | ||
|
||
import java.util.Map; | ||
|
||
public class PlayerLocationHandler { | ||
private static PlayerLocationHandler mInstance = null; | ||
|
||
public static PlayerLocationHandler getInstance() { | ||
if(mInstance == null) mInstance = new PlayerLocationHandler(); | ||
return mInstance; | ||
} | ||
|
||
Map<ProxiedPlayer, Point> playerLocations = Maps.newHashMap(); | ||
Map<ProxiedPlayer, Integer> playerRecall = Maps.newHashMap(); | ||
|
||
private PlayerLocationHandler() {} | ||
|
||
public void onPlayerJoin(ProxiedPlayer player) { | ||
playerLocations.remove(player); | ||
} | ||
|
||
public void onPlayerQuit(ProxiedPlayer player) { | ||
playerLocations.remove(player); | ||
} | ||
|
||
public void updateLocation(String sender, Point point) { | ||
if(false) { | ||
//if(!ProxyUtil.isServerRegional(ProxyUtil.getServerFromPlayerName(sender))) return; | ||
GeographicProjection projection = new ModifiedAirocean(); | ||
GeographicProjection uprightProj = GeographicProjection.orientProjection(projection, GeographicProjection.Orientation.upright); | ||
ScaleProjection scaleProj = new ScaleProjection(uprightProj, Constants.SCALE, Constants.SCALE); | ||
|
||
double proj[] = scaleProj.toGeo(Double.parseDouble(point.x), Double.parseDouble(point.z)); | ||
Sledgehammer.logger.info("Location: "+proj[0]+", "+proj[1]); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.