-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from SpaceServerUniverse/dev/syoyu-fix-suicide
/suでエラー履くやつ直し
- Loading branch information
Showing
5 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...in/java/space/yurisi/universecorev2/subplugins/changemessages/data/SuicidePlayerData.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,37 @@ | ||
package space.yurisi.universecorev2.subplugins.changemessages.data; | ||
|
||
import org.bukkit.entity.Player; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class SuicidePlayerData { | ||
|
||
private static SuicidePlayerData instance; | ||
private Map<String, Boolean> map; | ||
|
||
public SuicidePlayerData(){ | ||
instance = this; | ||
map = new HashMap<>(); | ||
} | ||
|
||
public static SuicidePlayerData getInstance(){ | ||
return instance; | ||
} | ||
|
||
public void register(Player player){ | ||
map.put(player.getUniqueId().toString(), false); | ||
} | ||
|
||
public void unregister(Player player){ | ||
map.remove(player.getUniqueId().toString()); | ||
} | ||
|
||
public void setChoke(Player player, boolean bool){ | ||
map.put(player.getUniqueId().toString(), bool); | ||
} | ||
|
||
public boolean isSuicide(Player player){ | ||
return map.get(player.getUniqueId().toString()); | ||
} | ||
} |
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
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