形式
Plain text
投稿日時
2020-12-11 21:07
公開期間
無期限
  1. private class FaweMaskHook extends BukkitMaskManager {
  2. public FaweMaskHook() {
  3. super("olympacreatif");
  4. }
  5. @Override
  6. public FaweMask getMask(final com.sk89q.worldedit.entity.Player wePlayer, MaskType type) {
  7. OlympaPlayerCreatif p = AccountProvider.get(BukkitAdapter.adapt(wePlayer).getUniqueId());
  8. Plot plot = plugin.getPlotsManager().getPlot(p.getPlayer().getLocation());
  9. if (plot == null)
  10. return null;
  11. BlockVector3 v1 = BlockVector3.at(plot.getPlotId().getLocation().getBlockX(), 0, plot.getPlotId().getLocation().getBlockZ());
  12. BlockVector3 v2 = BlockVector3.at(plot.getPlotId().getLocation().getBlockX() + WorldManager.plotSize - 1, 0,
  13. plot.getPlotId().getLocation().getBlockZ() + WorldManager.plotSize - 1);
  14. return new FaweMask(new CuboidRegion(v1, v2)) {
  15. @Override
  16. public boolean isValid(com.sk89q.worldedit.entity.Player wePlayer, MaskType type) {
  17. return plot != null && plot.getMembers().getPlayerLevel(p) >= 3;
  18. //return true; doesn't work even with this
  19. }
  20. };
  21. }
  22. }
ダウンロード 印刷用表示

このコピペの URL

JavaScript での埋め込み

iframe での埋め込み

元のテキスト